#include <inctypes.h>
#include <incctrls.h>

/*********************************************************************************
 * 
 * krl_mem_init - 内核内存管理初始化
 * 
 * DESCRIPTION
 */

void krl_mem_init (void)
    {
    kmempool_init ();

    return;
    }

/*********************************************************************************
 * 
 * krl_mem_new - 分配内存
 * 
 * DESCRIPTION
 */

addr_t krl_mem_new 
    (
    size_t newsz
    )
    {
    addr_t addr;

    addr = kmempool_new (newsz);

    return addr;
    }

/*********************************************************************************
 * 
 * krl_mem_delete - 释放内存
 * 
 * DESCRIPTION
 */

bool_t krl_mem_delete 
    (
    addr_t deladdr, 
    size_t delsz
    )
    {
    bool_t ret;

    ret = kmempool_delete (deladdr, delsz);

    return ret;
    }
